Hardware accelerated anti-aliased primitives using alpha gradients

ABSTRACT

Systems and methods are provided for providing anti-aliasing by introducing a falloff area around a graphics object to be rendered. The falloff area is shaded, using Gouraud shading or texture mapping to reduce the aliasing effects of the graphics object. The outside edge of the falloff area is set to be fully transparent, and the inside edge to an opacity matching the outer edge of the graphics object being rendered. To counteract bloating effects, the graphics object is shrunk by half the width of the falloff area. While the width of the falloff area may vary, generally, the width of the falloff area stays constant. In one embodiment, this width corresponds to the edge or diagonal of the square area mapped to each pixel.

CROSS-REFERENCE TO RELATED CASES

This application is a continuation of U.S. patent application Ser. No.10/341,168, filed on Jan. 13, 2003, (MSFT-1439) entitled “HardwareAccelerated Anti-Aliased Primitives Using Alphas Gradients.”

FIELD OF THE INVENTION

The present invention is directed to systems and methods for renderingimages at a very high image quality. More particularly, the presentinvention relates to systems and methods for the anti-aliasing ofgraphics.

BACKGROUND OF THE INVENTION

Conventionally, a complex object that is to be rendered for display maybe translated into a triangle mesh made up of one or more triangles thatapproximate the complex object. Information regarding these triangles,including vertex information, texture mapping information, and color andtransparency information, is then passed to the graphics card, where agraphics processor processes the information for display.

In order to display the object using the pixels on a computer screen orother display device, the object is mapped onto a grid of pixels. Eachpixel is mapped to a square area of the object. Using this mapping, oneof a number of conventional techniques can be used to calculate a set ofpixel values for each pixel. These pixel values include, conventionally,three color values (red, green, blue) and a transparency value.Conventionally, the pixel values for a pixel are determined byevaluating a function of the object at a point that corresponds to thecenter of the pixel.

Often, during rendering, the edges of a shape as rendered will exhibitjaggedness even though the edge was intended to be smooth. Such unwantedeffects, known as aliasing effects, are notoriously obvious to the humaneye. In order to reduce such effects, anti-aliasing is performed.Anti-aliasing techniques reduce aliasing effects, and thereby producegraphics superior to those produced without the use of suchanti-aliasing techniques.

In order to satisfy performance requirements, anti-aliasing must takeplace in the graphics-optimized environment of the graphics card.High-quality graphics rendering systems may include anti-aliasingtechniques, but because of the memory and processor requirements, onsome general-purpose graphics cards, full-scene anti-aliasing techniquesare not included. Where it is included, the full-scene anti-aliasingtechniques are resource intensive, and in some cases do not providequality rendering. Some graphics cards do include other anti-aliasingtechniques, such as anti-aliasing of edges; however, support for suchtechniques is not broad, and the developer of an application cannot relyon such support. Even where full-scene anti-aliasing is included on agraphics card, the memory requirements on the card are large and theperformance does not support demanding real-time graphics.

Thus, there is a need to implement anti-aliasing of graphics objects forreal-time graphics without requiring new functionality beyond thatcurrently present in most graphics cards, without requiring largeincreases in processing or memory usage in the graphics card, andwithout relying on techniques which are not widely supported in existinggraphics cards.

SUMMARY OF THE INVENTION

In view of the foregoing, the present invention provides systems andmethods for providing anti-aliasing using facilities currently widelysupported in graphics cards. In accordance with the invention, a falloffarea is created around each graphics object to be rendered. This falloffarea is a border around the graphics object being rendered which extendsout from the graphics object being rendered for approximately a givenwidth w. In a preferred embodiment, the falloff area is tessellated intoa triangle mesh.

Thus, using available graphics card capabilities, improved anti-aliasingis presented without causing a significant decrease in performance timeor memory usage.

The invention may be applied to a variety of image processingapplications wherein anti-aliasing is required and a method is neededthat can work across platforms, e.g. 3-D applications such as gameapplications.

Other features and embodiments of the present invention are describedbelow.

BRIEF DESCRIPTION OF THE DRAWINGS

The system and methods for providing anti-aliasing in accordance withthe present invention are further described with reference to theaccompanying drawings in which:

FIG. 1 is a block diagram representing an exemplary non-limitingcomputing device in which the present invention may be implemented;

FIG. 2 illustrates rendering a primitive to a grid of pixels;

FIG. 3 illustrates the falloff area added to a graphics object accordingto the invention;

FIG. 4 is a flow diagram of the anti-aliasing technique according to theinvention;

FIG. 5 illustrates the tessellation of the falloff area according to theinvention;

FIG. 6 illustrates the tessellation of another falloff area according tothe invention; and

FIG. 7 illustrates the resulting anti-aliasing according to theinvention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS Overview

The invention thus provides methods and systems for performinganti-aliasing using techniques widely supported by graphics cards. Afalloff area of width w is created around the object to be rendered. Inone embodiment, the falloff area is tessellated and the brush assignsthe same color each vertex of the triangles that make up the falloffarea, but the transparency assigned to the vertices depends on theirposition. The transparency of a vertex is proportional to the distancefrom the vertex to the object being rendered such that the verticesinterior to the falloff area are assigned the opacity of the object, andthe exterior vertices are assigned full transparency.

In another embodiment, the brush assigns a texture map that definescolor and transparency falloff for the falloff area. This texture may bespecifically created to mimic a Gaussian filter.

Either Gouraud shading or a falloff texture map may be used incombination with other texture mapping so that anti-aliased shapesrequiring arbitrary texture mapping may be rendered. In one embodiment,Gouraud shading is used to render the triangles in the falloff area Theouter vertices of the triangles in the falloff area are set to be fullytransparent. The inner vertices of the triangles in the falloff area areset to the opacity of the graphics object being rendered. In this way,the falloff area is shaded from transparency at the outside of thefalloff area to the opacity of the graphics object in the falloff arealocations adjacent to the graphics object. Gouraud shading is widelysupported in graphics cards and any increased load on the graphics cardwill not affect real-time performance.

In another embodiment, texture filtering is used to texture thetriangles in the falloff area. Since the width w of the falloff regionis known, a texture can be defined which controls the gradual falloff oftransparency over the falloff region. In a preferred embodiment, thistexture approximates Gaussian filtering. Bilinear texture filtering,which is widely supported in graphics cards, can be used to apply thistexture, and any increased load on the graphics card will not affectreal-time performance.

In a preferred embodiment, the object being drawn is shrunk beforerendering. In a preferred embodiment, the object shrinks by an amountequal to half of the falloff area width w. In a preferred embodiment,the width of the falloff area w is equal to one pixel; that is, w isequal to the length of an edge of the area in the graphics object thathas been mapped to each pixel. In another embodiment, the falloff areawidth w is equal to that edge length times √{square root over (2)}.

Exemplary Computing Device

FIG. 1 and the following discussion are intended to provide a briefgeneral description of a suitable computing environment in which theinvention may be implemented. It should be understood, however, thathandheld, portable and other computing devices and computing objects ofall kinds are contemplated for use in connection with the presentinvention, as described above. Thus, while a general purpose computer isdescribed below, this is but one example, and the present invention maybe implemented with other computing devices, such as a thin clienthaving network/bus interoperability and interaction. Thus, the presentinvention may be implemented in an environment of networked hostedservices in which very little or minimal client resources areimplicated, e.g., a networked environment in which the client deviceserves merely as an interface to the network/bus, such as an objectplaced in an appliance, or other computing devices and objects as well.In essence, anywhere that data may be stored or from which data may beretrieved is a desirable, or suitable, environment for operationaccording to the invention.

Although not required, the invention can be implemented via an operatingsystem, for use by a developer of services for a device or object,and/or included within application software that operates according tothe invention. Software may be described in the general context ofcomputer-executable instructions, such as program modules, beingexecuted by one or more computers, such as client workstations, serversor other devices. Generally, program modules include routines, programs,objects, components, data structures and the like that performparticular tasks or implement particular abstract data types. Typically,the functionality of the program modules may be combined or distributedas desired in various embodiments. Moreover, those skilled in the artwill appreciate that the invention may be practiced with other computersystem configurations. Other well known computing systems, environments,and/or configurations that may be suitable for use with the inventioninclude, but are not limited to, personal computers (PCs), automatedteller machines, server computers, hand-held or laptop devices,multi-processor systems, microprocessor-based systems, programmableconsumer electronics, network PCs, appliances, lights, environmentalcontrol elements, minicomputers, mainframe computers and the like. Theinvention may also be practiced in distributed computing environmentswhere tasks are performed by remote processing devices that are linkedthrough a communications network/bus or other data transmission medium.In a distributed computing environment, program modules may be locatedin both local and remote computer storage media including memory storagedevices, and client nodes may in turn behave as server nodes.

FIG. 1 thus illustrates an example of a suitable computing systemenvironment 100 in which the invention may be implemented, although asmade clear above, the computing system environment 100 is only oneexample of a suitable computing environment and is not intended tosuggest any limitation as to the scope of use or functionality of theinvention. Neither should the computing environment 100 be interpretedas having any dependency or requirement relating to any one orcombination of components illustrated in the exemplary operatingenvironment 100.

With reference to FIG. 1, an exemplary system for implementing theinvention includes a general purpose computing device in the form of acomputer 110. Components of computer 110 may include, but are notlimited to, a processing unit 120, a system memory 130, and a system bus121 that couples various system components including the system memoryto the processing unit 120. The system bus 121 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Association (VESA) local bus, and Peripheral ComponentInterconnect (PCI) bus (also known as Mezzanine bus).

Computer 110 typically includes a variety of computer readable mediaComputer readable media can be any available media that can be accessedby computer 110 and includes both volatile and nonvolatile media,removable and non-removable media By way of example, and not limitation,computer readable media may comprise computer storage media andcommunication media. Computer storage media includes both volatile andnonvolatile, removable and non-removable media implemented in any methodor technology for storage of information such as computer readableinstructions, data structures, program modules or other data. Computerstorage media includes, but is not limited to, Random Access Memory(RAM), Read Only Memory (ROM), Electrically Erasable Programmable ReadOnly Memory (EEPROM), flash memory or other memory technology, CompactDisk Read Only Memory (CDROM), digital versatile disks (DVD) or otheroptical disk storage, magnetic cassettes, magnetic tape, magnetic diskstorage or other magnetic storage devices, or any other medium which canbe used to store the desired information and which can accessed bycomputer 110. Communication media typically embodies computer readableinstructions, data structures, program modules or other data in amodulated data signal such as a carrier wave or other transportmechanism and includes any information delivery media. The term“modulated data signal” means a signal that has one or more of itscharacteristics set or changed in such a manner as to encode informationin the signal. By way of example, and not limitation, communicationmedia includes wired media such as a wired network or direct-wiredconnection, and wireless media such as acoustic, RF, infrared and otherwireless media. Combinations of any of the above should also be includedwithin the scope of computer readable media.

The system memory 130 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 131and random access memory (RAM) 132. A basic input/output system 133(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 110, such as during start-up, istypically stored in ROM 131. RAM 132 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 120. By way of example, and notlimitation, FIG. 1 illustrates operating system 134, applicationprograms 135, other program modules 136, and program data 137.

The computer 110 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 1 illustrates a hard disk drive 141 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 151that reads from or writes to a removable, nonvolatile magnetic disk 152,and an optical disk drive 155 that reads from or writes to a removable,nonvolatile optical disk 156, such as a CD ROM or other optical media.Other removable/non-removable, volatile/nonvolatile computer storagemedia that can be used in the exemplary operating environment include,but are not limited to, magnetic tape cassettes, flash memory cards,digital versatile disks, digital video tape, solid state RAM, solidstate ROM, and the like. The hard disk drive 141 is typically connectedto the system bus 121 through an non-removable memory interface such asinterface 140, and magnetic disk drive 151 and optical disk drive 155are typically connected to the system bus 121 by a removable memoryinterface, such as interface 150.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 1 provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 110. In FIG. 1, for example, hard disk drive 141 is illustratedas storing operating system 144, application programs 145, other programmodules 146, and program data 147. Note that these components can eitherbe the same as or different from operating system 134, applicationprograms 135, other program modules 136, and program data 137. Operatingsystem 144, application programs 145, other program modules 146, andprogram data 147 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 110 through input devices such as akeyboard 162 and pointing device 161, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit120 through a user input interface 160 that is coupled to the system bus121, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB). A graphicsinterface 182, such as Northbridge, may also be connected to the systembus 121. Northbridge is a chipset that communicates with the CPU, orhost processing unit 120, and assumes responsibility for acceleratedgraphics port (AGP) communications. One or more graphics processingunits (GPUs) 184 may communicate with graphics interface 182. In thisregard, GPUs 184 generally include on-chip memory storage, such asregister storage and GPUs 184 communicate with a video memory 186. GPUs184, however, are but one example of a coprocessor and thus a variety ofcoprocessing devices may be included in computer 110. A monitor 191 orother type of display device is also connected to the system bus 121 viaan interface, such as a video interface 190, which may in turncommunicate with video memory 186. In addition to monitor 191, computersmay also include other peripheral output devices such as speakers 197and printer 196, which may be connected through an output peripheralinterface 195.

The computer 110 may operate in a networked or distributed environmentusing logical connections to one or more remote computers, such as aremote computer 180. The remote computer 180 may be a personal computer,a server, a router, a network PC, a peer device or other common networknode, and typically includes many or all of the elements described aboverelative to the computer 110, although only a memory storage device 181has been illustrated in FIG. 1. The logical connections depicted in FIG.1 include a local area network (LAN) 171 and a wide area network (WAN)173, but may also include other networks/buses. Such networkingenvironments are commonplace in homes, offices, enterprise-wide computernetworks, intranets and the Internet.

When used in a LAN networking environment, the computer 110 is connectedto the LAN 171 through a network interface or adapter 170. When used ina WAN networking environment, the computer 110 typically includes amodem 172 or other means for establishing communications over the WAN173, such as the Internet. The modem 172, which may be internal orexternal, may be connected to the system bus 121 via the user inputinterface 160, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 110, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 1 illustrates remoteapplication programs 185 as residing on memory device 181. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

Various distributed computing frameworks have been and are beingdeveloped in light of the convergence of personal computing and theInternet. Individuals and business users alike are provided with aseamlessly interoperable and Web-enabled interface for applications andcomputing devices, making computing activities increasingly Web browseror network-oriented.

For example, MICROSOFT®'s .NET platform includes servers, building-blockservices, such as Web-based data storage and downloadable devicesoftware. While exemplary embodiments herein are described in connectionwith software residing on a computing device, one or more portions ofthe invention may also be implemented via an operating system,application programming interface (API) or a “middle man” object betweenany of a coprocessor, a display device and requesting object, such thatoperation according to the invention may be performed by, supported inor accessed via all of .NET's languages and services, and in otherdistributed computing frameworks as well.

Graphics Processing

Because of the complexity of displaying graphics, specialized subsystemsare included in computer systems for handling graphics data. Withreference to FIG. 1, a program such as application program 135communicates over system bus 121 with the GPU 184 through graphicsinterface 182. The GPU places data into video memory 186, where itcommunicated for display on a monitor 191. For some data to bedisplayed, pixel data is included and stored in the video interface withlittle processing necessary. For example, the display of a bitmappedimage may not require complicated graphics processing. However, someapplications, for example, gaming applications, create new shapes andviews in real-time. Instead of pixel data, the GPU 184 receives vertexdata from such applications. The vertex data includes location, color,and transparency data for graphics primitives. This “wireframe” model istransformed by the GPU 184 into geometric data. For example, atriangulation set which translates a complex object to be rendered intoa triangle mesh may be calculated using hardware accelerated pipelines.

Once geometric data (or pixel data) has been developed, the data isrendered to a grid for display. The data is converted into fragments,each of which corresponds to a pixel. Vertices are connected into lines,interior pixels are calculated for geometric primitives. Color and depthvalues are assigned for each fragment. The processed fragment is thendrawn into the appropriate buffer in video memory 186, where it will besent for display to monitor 191.

For example, in FIG. 2, a shape 1000 is to be rendered (in black) to agrid of pixels 1100. The graphics processor will receive the location ofthe vertices of shape 1000 and color information for those vertices. Ascan be seen in FIG. 2, the edge of shape 1000 passes through the middleof several pixels. Only one color value can be displayed by any onepixel. Therefore, according to one conventional technique, the color ofeach pixel (black or white) in the grid of pixels is determined byevaluating whether the center point of the pixel is inside of the shape1000 being rendered. If it lies inside the shape 1000, then the pixel iscolored black. If it lies outside the shape, the pixel is transparent.The resulting grid of pixels 1200 displays aliasing effects—instead ofthe smooth edges and bilateral symmetry that the shape was intended tohave, the resultant shape has jagged and non-symmetric edges.

In order to prevent aliasing, several anti-aliasing techniques have beendeveloped. One conventional anti-aliasing technique is full sceneanti-aliasing. In full scene anti-aliasing, the entire scene beingrendered is rendered onto a grid of cells. The grid contains more cellsthan the actual pixel grid has pixels. For example, one conventionalanti-aliasing technique is 4×4 multi-sampling, in which sixteen cells inthe grid of cells represent each pixel. The center of each cell isexamined to determine whether the center lies inside or outside of theshape being rendered. After the entire scene is rendered, the dataregarding each of the cells representing the pixel are combined todetermine the values for the pixel. This technique requires a largeamount of processing power and memory on the graphics card, generally onthe order of sixteen times as much processing and memory for 4×4anti-aliasing, and possibly more, depending on which card is being used.

A related anti-aliasing technique is super-sampling, a variation onmulti-sampling in which the combination of cells representing a pixelgives more weight to cells sampled for a given pixel when those cellsare closer to the center of the pixel, and less weight to those furtheraway from the center of the pixel.

Another conventional anti-aliasing technique is weighted pixel sampling.Weighted pixel sampling combines a number of sample values to yield avalue for the pixel. Samples for a given pixel may even be taken outsideof the area mapped to that pixel. The sample values are given weights todetermine the amount of influence each sample value will have on thefinal result for the pixel. In one conventional implementation, indetermining pixel values for a pixel, more influence is given to samplesthat are closer to the center of that pixel. According to a conventionaltechnique, using a Gaussian function for weighted sampling on a samplearea of radius 0.75 pixels around the center of a pixel yields goodresults.

Anti-Aliasing Using a Falloff Area

According to a preferred embodiment of the invention, as seen in FIG. 3,a falloff area 310 is drawn around the graphics object 300 to berendered. In a preferred embodiment of the invention, the falloff area310 generally has a constant width w, as shown. As shown, however, theshape of falloff area 310 may be chosen so that it is easily tessellatedinto a triangle mesh or other tessellation primitives, therefore thewidth of the falloff area may not be constant over the entire falloffarea.

Associated with falloff area 310 is data to be used in rendering falloffarea 310, which defines a falloff in opacity in falloff area 310. Thefalloff in opacity corresponds to decreasing proximity from the graphicsobject. In a preferred embodiment, the opacity of the inside edge of thefalloff area 310 matches the opacity on the outer edge of the graphicsobject 300. This opacity shades off gradually, and the outside edge ofthe falloff area is transparent.

In other words, the opacity in a region of falloff area 310 adjacent tothe graphics object 300 (e.g. the region in which the letter A appears)should be substantially equal to the opacity of the region of graphicsobject 300 (e.g. the region in which the letter B appears) that isadjacent to that falloff region. If the graphics object 300 is fullyopaque, then the areas of the fall off area 310 substantially near tothe graphics object 300 should also be fully opaque. If the graphicsobject 300 has opacity p, then the region of the falloff area 310substantially near to the graphics object 300 should also have opacityp. The regions of the falloff area 310 which are farther from thegraphics object 300 should be more transparent.

The shading of the falloff area is done by using techniques supported inthe graphics card, such as Gouraud shading and texture mapping. Otherwidely-supported techniques in graphics cards may also be used.According to one embodiment of the invention, the falloff area is addedand vertex and other falloff area information is then passed to agraphics processing unit 184 (in FIG. 1) which renders the graphicobject and the falloff area onto a display such as monitor 191.

The value for w, the width of the falloff area, in a preferredembodiment, is done by reference to the mapping of the graphic object tothe pixels of the display. Conventionally, when the graphic object ismapped to a pixel, the area of the graphics object that will berepresented by a pixel will be a square. In a preferred embodiment, w isequal to a side of this square. In another embodiment, w is equal to thediagonal of the square (or √{square root over (2)} times the length ofone side of the square.)

Thus, as shown in FIG. 4, in order to reduce aliasing effects, a falloffarea is created around the graphics object, 410. The falloff area istessellated, 420. Opacity falloff data is associated with the falloffarea primitives such that the vertex data and opacity falloff datadefine a falloff area around the graphics object, with opacity falloffdata assigned so that the graphics area, when rendered, has a falloff inopacity from the opacity of the graphics object (at the edge of theobject) to zero (at the outside of the falloff area) 430. Two methods ofperforming this step 430 are Gourad shading and texture mapping, asdescribed below. In one embodiment, the anti-aliasing according to thisinvention is performed by the application generating the graphicsobjects being anti-aliased. Other embodiments, in which theanti-aliasing is performed by a separate pre-rendering application arealso contemplated.

Gouraud Shading in the Falloff Area

The desired falloff in opacity may be created using Gouraud shading(“intensity interpolation shading”). Gouraud shading is a technique forshading a graphics object. When Gouraud shading is applied to a polygon,each vertex of the polygon is assigned a color and transparency. If adifferent color or transparency value is specified for a differentvertex, when the polygon is rendered, a smooth interpolation isperformed across the surface of the polygon. This technique isconventionally used to allow for smooth variations in color of complexshapes to allow for more natural shading in an object composed ofseveral graphics primitives.

As shown in FIG. 5, in order to use Gouraud shading for the falloff area310, in a preferred embodiment, the falloff area 310 is tessellated intoa triangle mesh 500. The triangles 510 making up triangle mesh 500 willbe sent to the graphics card to be rendered. In order to do this,vertices, with position, color, and transparency (or alpha) values, aresent to the graphics card. The vertices are each assigned the colorvalue of the graphics object 300. Some vertices of the triangle meshwill fall on the graphics object 300. These interior vertices, such asvertices 505 and 507, are given an opacity value equal to that of theopacity of the graphics object 300. Other vertices will fall on theoutside of the falloff area 310. These exterior vertices, such asvertices 515 and 517, are given an opacity value equal to fulltransparency.

In many cases, the vertices produced in tessellating the falloff area310 into a triangle mesh 500 will all be interior or exterior vertices.However, for more complex graphics objects, the falloff area 310 may betessellated and vertices may be produced which include vertices whichare not interior vertices and are not exterior vertices. In a preferredembodiment, the opacity value for such a vertex is proportional to howclose the vertex is to the graphics object. For example, if the graphicsobject is of opacity p, a vertex which is d distance from the outside ofthe falloff area will be assigned an opacity of p*(d/w). This may alsooccur where the graphics object is thinner than one pixel in width. InFIG. 6, object 600 is a rectangle which is thinner than one pixel inwidth. In such a case, the shape is included in the falloff area 610.The falloff area, when tessellated, includes vertices 620 which are onthe interior of the object 600. These vertices will be assigned anopacity proportional to their distance from the exterior boundary ofobject 600.

When Gouraud shading is performed, then, in the graphics card on thetriangle mesh described by these vertex values, the falloff area willexhibit a falloff in opacity corresponding to decreasing proximity fromthe graphics object. Since Gouraud shading is widely supported ingraphics cards and may be accomplished in real-time without noticeableperformance degradation, this allows real-time anti-aliasing withstandard graphics cards. As shown in FIG. 7, a graphic object thatexhibits significant aliasing effects 700 is significantly anti-aliasedwhen the inventive technique is performed, as can be viewed in theresulting graphic object 710.

Texture Filtering of the Falloff Area

The desired falloff in opacity may also be created using texturefiltering.

Texture mapping is a technique for adding realism to acomputer-generated scene. Texture mapping lays an image (the texture)onto an object in a scene. Because texture mapping is so useful, it isbeing provided as a standard rendering technique both in graphicssoftware interfaces and in computer graphics hardware.

When mapping a texture onto an object, the color and/or transparency ofthe object at each pixel is modified by a corresponding color and/ortransparency from the texture. The texture is generally stored as asampled array, so a continuous image must first be reconstructed fromthe samples. Textures are made up of texels, which are the base unit ofa graphic. When a texture is applied to an object, the mapping of texelsto pixels need not be one-to-one. To create smooth texture applicationwhere the mapping of texels to pixels is not one-to-one, graphics cardssupport bilinear texture filtering. Bilinear texture filtering averagesfour adjacent texels and interpolates, creating new texel data.

In order to use texture mapping to shade the falloff area, a texture iscreated with transparency (alpha) values that vary from one side of thetexture map to the other. When applied to the falloff area, then, thiswill cause a falloff in transparency. On one edge of the texture map,the transparency values for the texels are set to full transparency. Onthe other, the transparency values are set to equal to the transparencyof the graphics object 310.

Transparency values for intermediate texels in the texture map can bedetermined in any number of ways. In a preferred embodiment, theintermediate transparency values are inversely proportional to thedistance from the edge with full transparency. This will create aneffect similar to the one created by using Gouraud shading. However, thetransparency values for the interior texels may also be determined usinga Gaussian curve instead of a straight proportional line. In this way,when the texture map is applied to the falloff area, the anti-aliasingproduced will simulate that created through the use of a Gaussianfilter. However, this is done using the bilateral texture filteringwhich is supported widely in graphics cards, and without the performancedegradation that the use of a Gaussian filter would entail.

Counteracting Bloating

Because the falloff area adds additional area to the graphic object'soriginal area, an image rendered without any resizing will suffer from a“bloating” effect. This may cause the rendered image to appear biggerthan the original graphic object was intended to be, which may be anundesirable consequence of the use of the falloff area

In order to counteract this bloating, the original graphic object may beshrunk before the falloff area is added. Where the width of the falloffarea is w, according to one embodiment of the invention, the graphicobject shrinks by ½ w on all sides.

Where texture mapping is used in the falloff area to approximatedifferent patterns for the falloff in opacity, a different amount ofshrinking may be used in order to best counteract the possible bloatingeffect. For example, if the falloff in a texture map is steep, andtransparency falls off steeply at ¼ w in the falloff area, then it mayonly be necessary to shrink the graphics object by that amount.

Texturing

In order to create sophisticated graphic objects, a texture map may beused on a graphic object in order to add complex color effects. Othertexture map applications may be used to add other texture effects.According to one embodiment of the invention, whatever textures areapplied to the graphics object to which a falloff area has been addedshould also be added to the falloff area.

Where Gouraud shading is used, the falloff area may be textured withwhatever texture map is being used for the graphic object. Where thetexture mapping data is used for controlling the transparency of thefalloff area, any textures applied to the graphics object may be appliedto the falloff area as well as the falloff texture. This multitexturingis supported by graphics cards and provides the flexibility to renderanti-aliased shapes that require arbitrary texture mapping.

CONCLUSION

As mentioned above, while exemplary embodiments of the present inventionhave been described in connection with various computing devices andnetwork architectures, the underlying concepts may be applied to anycomputing device or system. Thus, the techniques for providing improvedanti-aliasing in accordance with the present invention may be applied toa variety of applications and devices. For instance, the algorithm(s) ofthe invention may be applied to the operating system of a computingdevice, provided as a separate object on the device, as part of anotherobject, as a downloadable object from a server, as a “middle man”between a device or object and the network, as a distributed object,etc. While exemplary programming languages, names and examples arechosen herein as representative of various choices, these languages,names and examples are not intended to be limiting. One of ordinaryskill in the art will appreciate that there are numerous ways ofproviding object code that achieves the same, similar or equivalentforward mapping achieved by the invention.

The various techniques described herein may be implemented in connectionwith hardware or software or, where appropriate, with a combination ofboth. Thus, the methods and apparatus of the present invention, orcertain aspects or portions thereof, may take the form of program code(i.e., instructions) embodied in tangible media, such as floppydiskettes, CD-ROMs, hard drives, or any other machine-readable storagemedium, wherein, when the program code is loaded into and executed by amachine, such as a computer, the machine becomes an apparatus forpracticing the invention. In the case of program code execution onprogrammable computers, the computing device will generally include aprocessor, a storage medium readable by the processor (includingvolatile and non-volatile memory and/or storage elements), at least oneinput device, and at least one output device. One or more programs thatmay utilize the signal processing services of the present invention,e.g., through the use of a data processing API or the like, arepreferably implemented in a high level procedural or object orientedprogramming language to communicate with a computer system. However, theprogram(s) can be implemented in assembly or machine language, ifdesired. In any case, the language may be a compiled or interpretedlanguage, and combined with hardware implementations.

The methods and apparatus of the present invention may also be practicedvia communications embodied in the form of program code that istransmitted over some transmission medium, such as over electricalwiring or cabling, through fiber optics, or via any other form oftransmission, wherein, when the program code is received and loaded intoand executed by a machine, such as an EPROM, a gate array, aprogrammable logic device (PLD), a client computer, a video recorder orthe like, or a receiving machine having the signal processingcapabilities as described in exemplary embodiments above becomes anapparatus for practicing the invention. When implemented on ageneral-purpose processor, the program code combines with the processorto provide a unique apparatus that operates to invoke the functionalityof the present invention. Additionally, any storage techniques used inconnection with the present invention may invariably be a combination ofhardware and software.

While the present invention has been described in connection with thepreferred embodiments of the various figures, it is to be understoodthat other similar embodiments may be used or modifications andadditions may be made to the described embodiment for performing thesame function of the present invention without deviating therefrom. Forexample, while exemplary network environments of the invention aredescribed in the context of a networked environment, such as a peer topeer networked environment, one skilled in the art will recognize thatthe present invention is not limited thereto, and that the methods, asdescribed in the present application may apply to any computing deviceor environment, such as a gaming console, handheld computer, portablecomputer, etc., whether wired or wireless, and may be applied to anynumber of such computing devices connected via a communications network,and interacting across the network. Furthermore, it should be emphasizedthat a variety of computer platforms, including handheld deviceoperating systems and other application specific operating systems arecontemplated, especially as the number of wireless networked devicescontinues to proliferate. Still further, the present invention may beimplemented in or across a plurality of processing chips or devices, andstorage may similarly be effected across a plurality of devices.Therefore, the present invention should not be limited to any singleembodiment, but rather should be construed in breadth and scope inaccordance with the appended claims.

1. A method for reducing aliasing effects for a given graphics object tobe rendered, comprising: creating by way of a processor a falloff areaobject comprising a falloff area around said graphics object; generatingopacity falloff data associated with said falloff area object defining afalloff in opacity in said falloff area, said falloff in opacitycorresponding to decreasing proximity from said graphics object, wheresaid opacity falloff data comprises texture mapping data describing afalloff curve; and shrinking said given graphics object to be renderedas a function of the average width of the falloff area at each edge. 2.The method of claim 1, where said texture mapping data comprises datawhich approximates a Gaussian function.
 3. The method of claim 1, wheresaid texture mapping data comprises bilinear texture filtering data. 4.The method of claim 1, where the average width of said falloff areaobject is w, and where said shrinking of said given graphics objectcomprises shrinking said given graphics object by approximately ½ w ateach edge.
 5. The method of claim 1, where said given graphics object isto be rendered to a grid of pixels, where each pixel corresponds to asquare area of said given graphics object, and where the average width wof said falloff area object is substantially equal to the length of oneside of said square area.
 6. The method of claim 1, where said givengraphics object is to be rendered to a grid of pixels, where each pixelcorresponds to a square area of said given graphics object, and wherethe average width w of said falloff area object is substantially equalto √{square root over (2)} times the length of one side of said squarearea.
 7. A computer-readable physical storage medium for reducingaliasing effects for a given graphics object to be rendered, havingstored thereon at least one computer-executable module comprisingcomputer executable instructions for performing a method, the methodcomprising: creating a falloff area object comprising a falloff areaaround said graphics object; generating opacity falloff data associatedwith said falloff area object defining a falloff in opacity in saidfalloff area, said falloff in opacity corresponding to decreasingproximity from said graphics object, where said opacity falloff datacomprises texture mapping data describing a falloff curve; and shrinkingsaid given graphics object to be rendered to account for the addition ofthe falloff area.
 8. The computer-readable physical storage medium ofclaim 7, where said texture mapping data comprises data whichapproximates a Gaussian function.
 9. The computer-readable physicalstorage medium of claim 7, where said texture mapping data comprisesbilinear texture filtering data.
 10. The computer-readable physicalstorage medium of claim 7, where the average width of said falloff areaobject is w, and where said shrinking of said given graphics objectcomprises shrinking said given graphics object by approximately ½ w ateach edge.
 11. The computer-readable physical storage medium of claim 7,where said given graphics object is to be rendered to a grid of pixels,where each pixel corresponds to a square area of said given graphicsobject, and where the average width w of said falloff area object issubstantially equal to the length of one side of said square area. 12.The computer-readable physical storage medium of claim 7, where saidgiven graphics object is to be rendered to a grid of pixels, where eachpixel corresponds to a square area of said given graphics object, andwhere the average width w of said falloff area object is substantiallyequal to √{square root over (2)} times the length of one side of saidsquare area.
 13. A computer device for reducing aliasing effects for agiven graphics object to be rendered, comprising: means for creating afalloff area object comprising a falloff area around said graphicsobject; means for generating opacity falloff data associated with saidfalloff area object defining a falloff in opacity in said falloff area,said falloff in opacity corresponding to decreasing proximity from saidgraphics object, where said opacity falloff data comprises texturemapping data describing a falloff curve; and means for reducing the sizeof said given graphics object to be rendered based on the fall off areaaround said graphics object.
 14. The computer device of claim 13, wheresaid texture mapping data comprises data which approximates a Gaussianfunction.
 15. The computer device of claim 13, where said texturemapping data comprises bilinear texture filtering data.
 16. The computerdevice of claim 13, where the average width of said falloff area objectis w, and where said shrinking of said given graphics object comprisesshrinking said given graphics object by approximately ½ w at each edge.17. The computer device of claim 13, where said given graphics object isto be rendered to a grid of pixels, where each pixel corresponds to asquare area of said given graphics object, and where the average width wof said falloff area object is substantially equal to the length of oneside of said square area.